﻿




using System;
using Hotpot.Infrastructure;
using Hotpot.Models;
using Hotpot.Modules.Membership.Models;

namespace Hotpot.Modules.Membership.Extensions
{
    public static class UserExtensions
    {
        public static User Apply(this User user, UserInputEdit input, Func<string, string> computeEmailHash, EntityState status)
        {
            return new User(user.ID, input.UserName, input.DisplayName, input.Email, computeEmailHash(input.Email), user.LanguageDefault, status);
        }
    }
}
